package cn.lanqiao.blog.service;

import com.github.pagehelper.PageInfo;

import cn.lanqiao.blog.entity.Article;
import cn.lanqiao.blog.vo.ArticleVO;

public interface ArticleServicle {

	PageInfo<ArticleVO> getAllVisible(Integer userId, Integer pageNum, Integer pageSize, String title, String username, Integer lableId);
	
	PageInfo<ArticleVO> getFollow(Integer userId, Integer pageNum, Integer pageSize, String title, String username, Integer lableId);
	
	PageInfo<ArticleVO> getMyArticle(Integer userId, Integer pageNum, Integer pageSize, String title, Integer lableId);
	
	int getArticleCommentCount(Integer articleId);
	
	int increasePraise(Integer articleId);
	
	int decreasePraise(Integer articleId);
	
	int increaseViews(Integer articleId);
	
	PageInfo<ArticleVO> getCollectionList(Integer userId, Integer pageNum, Integer pageSize, String title, String username, Integer lableId);
	
	int addCollection(Integer userId, Integer articleId);
	
	int deleteCollection(Integer userId, Integer articleId);
	
	PageInfo<ArticleVO> showAdminArticle(Integer adminId, Integer viewerId, Integer pageNum, Integer pageSize, String title, Integer lableId);
	
	int changeVisible(Integer articleId, Integer visible);
	
	int changeCommentable(Integer articleId, Integer commentable);
	
	PageInfo<ArticleVO> getTouristVisible(Integer pageNum, Integer pageSize, String title, String username, Integer lableId);
	
	//获取游客文章分页total
	int getTouristTotal(String title, String username, Integer lableId);
	
	//获取登录后首页文章分页total
	int getAllVisibleTotal(Integer userId, String title, String username, Integer lableId);
	
	//获取我的关注文章分页total
	int getMyFollowTotal(Integer userId, String title, String username, Integer lableId);
	
	//获取我的收藏文章分页total
	int getMyCollectionTotal(Integer userId, String title, String username, Integer lableId);
	
	//获取我的文章分页total
	int getMyArticleTotal(Integer userId, String title, Integer lableId);
	
	//获取粉丝进入他人主页文章分页total
	int getAdminFansTotal(Integer adminId, String title, Integer lableId);
	
	//获取非粉丝进入他人主页文章分页total
	int getNotAdminFansTotal(Integer adminId, String title, Integer lableId);
	
	//判断是否是主人粉丝
	boolean isAdminFans(Integer adminId, Integer viewerId);
	
	//写文章
	int writeArticle(Article article, Integer[] lableIds);
	
	//文章详情
	ArticleVO getArticleDetail(Integer articleId);
	
	//编辑文章
	int editArticle(Article article, Integer[] lableIds);
	
	//点赞文章
	int praiseArticle(Integer userId, Integer articleId);
	
	//取消点赞
	int delPraise(Integer userId, Integer articleId);
	
	PageInfo<ArticleVO> getArticlePage(Integer pageNum, Integer pageSize,Article record);
	PageInfo<ArticleVO> getNoArticlePage(Integer pageNum, Integer pageSize,Article record);

	int deleteArticle(Integer id);
	//审核
	int updateArticle(Article record);
}
